<template>
<!--  <div>
    &lt;!&ndash;<el-table
      :data="dataList"
      size="medium"
      row-key="id"
      v-loading="loading"
      class="table">
	  <table-tree-column
        prop="name"
        treeKey="id"
        parentKey="parentId"
        show-overflow-tooltip
        label="名称">
      </table-tree-column>
      <tree
    </el-table>&ndash;&gt;
    <el-tree :data="dataList" v-loading="loading" :props="defaultProps" @node-click="handleNodeClick"></el-tree>

    &lt;!&ndash; 弹窗, 新增 / 修改 &ndash;&gt;
&lt;!&ndash;    <TestTreeForm  ref="testTreeForm" @refreshDataList="refreshList"></TestTreeForm>&ndash;&gt;
  </div>-->
  <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>

</template>

<script>
  // import TableTreeColumn from '@/components/table-tree-column'
  export default {
    data() {
      return {
        data: [],
        defaultProps: {
          children: 'children',
          label: 'label'
        }
      };
    },
    components: {
    },
    activated () {
      this.refreshList()
    },

    methods: {
      // 获取数据列表
      refreshList () {
        this.loading = true
        this.$http({
          url: '/test/processTime/pcOnline',
          method: 'get'
        }).then(({data}) => {
          console.log(data.list);
          // this.dataList = data.list
          this.data = data.list;
          // this.dataList = data.list;
          // this.loading = false
        })
      },
      handleNodeClick(data) {
        console.log(data);
      }
    }
  }
</script>
